is list sequential C#

83

is list sequential C# -

bool isConsecutive = !myIntList.Select((i,j) => i-j).Distinct().Skip(1).Any();

Comments

Submit
0 Comments